$("#hearder").on("click","img",function(){
	history.go(-1)
})


var id=parseInt(getUrlParam("id"))
getData(id)
function getData(id){
		$.ajax({
    	type:"get",
    	url:Url+"getAdminLogisInfo/"+id,
    	async:false,
    	beforeSend: function () {
    			
		},
		complete: function () {
			
		},
    	success: function(data){
           console.log(data);
           if (data.logistics_json.result.deliverystatus == 1) {
                $(".state").children().text("在途中")
           } else if (data.logistics_json.result.deliverystatus == 2) {
                $(".state").children().text("派送中")
           } else if (data.logistics_json.result.deliverystatus == 3) {
                $(".state").children().text("已签收")
           } else if (data.logistics_json.result.deliverystatus == 4) {
                $(".state").children().text("派送失败")
           }
                $(".od-img").attr("src", data.img_url)
                $(".orderNumber").children().eq(0).text(data.wuliucompang.name+":")
                $(".orderNumber").children().eq(1).text(data.logistics_number)
                $(".logisticsService").children().eq(1).text(data.wuliucompang.tel).attr("href","tel:"+data.wuliucompang.tel)
                
                
                console.log(data)
                var str = '';
                for (var i = 0; i < data.logistics_json.result.list.length; i++) {
                    str += '<div class="logistics-main-content clear">'
				                +'<div class="l-m-c-time newest">'
				                   +'<div>'+data.logistics_json.result.list[i].time+'</div>'
				                +'</div>'
				                +'<img class="l-m-c-img1" src="img/dian.png"/>'
				                +'<div class="l-m-c-main newest">'
				                   +'<div>'+data.logistics_json.result.list[i].status+'</div>'
				                +'</div>'
				            +'</div>';
                }
                $(".logistics-main").append(str)
          }
    	});
}
